#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <assert.h>
#include <limits.h>
#include <ctype.h>

int
main(int argc, char **argv)
{
	static char s1[104], s2[104];
	char *f = NULL;
	int i = 0, ans = 0;

	(void) fgets(s1, 103, stdin);
	if (strrchr(s1, '\n'))
		*strrchr(s1, '\n') = 0;
	(void) fgets(s2, 103, stdin);
	if (strrchr(s2, '\n'))
		*strrchr(s2, '\n') = 0;

	while (i < strlen(s2) - strlen(s1) + 2) {
		if ((f = strstr(&s2[i], s1)) != NULL) {
			ans++;
			i += f - &s2[i] + 1;
		} else {
			break;
		}
	}

	printf("%d\n", ans);

	return 0;
}
